package com.henu.engineer.dao.mapper.testpaper

import com.henu.engineer.dao.entity.testpaper.TestPaper
import org.apache.ibatis.annotations.Mapper
import org.springframework.stereotype.Repository

/**
 * 试卷审批表
 *
 * @author noexcept
 * @date 2021/8/5 0:51
 */
@Mapper
@Repository
interface TestPaperXmlMapper {
    fun insertSingle(paper: TestPaper): Boolean
    fun insertList(testPaperList: List<TestPaper>): Int
    fun deleteSingle(id: String): Boolean
    fun deleteList(ids: List<String>): Int

    /**
     * 查找试卷
     */
    fun selectTestPaper(id: String): TestPaper?

    /**
     * 根据课程id选择试卷
     */
    fun selectTestPaperByCourseId(courseId: String): TestPaper?

    /**
     * 查找多个试卷
     * @param ids 试卷的id集合，集合至少包含一个元素
     */
    fun selectTestPaperList(ids: List<String>): List<TestPaper>
}